_dir_items = 0
_log_flag  = None
log_file   = 'xbmc_dummy.log'

LOGDEBUG   = 'DEBUG'
LOGERROR   = 'ERROR'
LOGFATAL   = 'FATAL'
LOGINFO    = 'INFO'
LOGNONE    = 'NONE'
LOGNOTICE  = 'NOTICE'
LOGSEVERE  = 'SEVERE'
LOGWARNING = 'WARNING'

def log( message, level ):
    global log_file, _log_flag
    
    if _log_flag: 
        write_mode = 'a'
    else:
        write_mode = 'w'
        _log_flag  = True
        
    file_handle = open( log_file, 'w' )
    file_handle.write( '%s: %s' % ( level, message ) )
    file_handle.close()




def addDirectoryItem( handle, url, listitem, isFolder=False, totalItems=0 ):
    global _dir_items
    _dir_items += 1
    

def endOfDirectory(handle, succeeded=True updateListing=False cacheToDisc=True):
    pass
    

def setResolvedUrl(handle, succeeded, listitem):
    pass
    
    
class ListItem:
    def __init__( self, label='', label2='', iconImage='' thumbnailImage='', path='' ):
        pass